<?php
/**
 * BjyAuthorize Module (https://github.com/bjyoungblood/BjyAuthorize)
 *
 * @link https://github.com/bjyoungblood/BjyAuthorize for the canonical source repository
 * @license http://framework.zend.com/license/new-bsd New BSD License
 */

return array(
    'bjyauthorize' => array(
        // default role for unauthenticated users
        'default_role'          => 'guest',

        // default role for authenticated users (if using the
        // 'BjyAuthorize\Provider\Identity\AuthenticationIdentityProvider' identity provider)
        'authenticated_role'    => 'user',

        // identity provider service name
        'identity_provider'     => 'BjyAuthorize\Provider\Identity\ZfcUserZendDb',

        // Role providers to be used to load all available roles into Zend\Permissions\Acl\Acl
        // Keys are the provider service names, values are the options to be passed to the provider
        'role_providers' => array(
            'BjyAuthorize\Provider\Role\ZendDb' => array(
                'table' => 'user_role',
                'role_id_field' => 'roleId',
                'parent_role_field' => 'parent_id'
            )
        ),

        // Guard listeners to be attached to the application event manager
        'guards' => array(
            'BjyAuthorize\Guard\Route' => array(
                array('route' => 'home', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'homeback', 'roles' => array('admin')),
                array('route' => 'zfcuser', 'roles' => array('user', 'admin')),
                array('route' => 'zfcuser/index', 'roles' => array('user', 'admin')),
                array('route' => 'zfcuser/login', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'zfcuser/logout', 'roles' => array('user', 'admin')),
                array('route' => 'zfcuser/register', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'zfcuser/changeemail', 'roles' => array('user', 'admin')),
                array('route' => 'cgv', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'produit', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'mentionsLegales', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'contact', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'returnContact', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'envoieMail', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'pager', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'produit', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'produitback', 'roles' => array('user', 'admin')),
                array('route' => 'test-doctrine', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'zfcuser/changepassword', 'roles' => array('user', 'admin')),
                array('route' => 'backoffice', 'roles' => array('user', 'admin')),
                array('route' => 'backoffice/default', 'roles' => array('admin')),
                array('route' => 'page', 'roles' => array('admin')),
                array('route' => 'annonce', 'roles' => array('admin')),
                array('route' => 'moteurRecherche', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'rechercher', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'article', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'search', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'blog', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'favoris', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'filactu', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'forum', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'message', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'parametre', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'search', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'utilisateur', 'roles' => array('admin')),
                array('route' => 'boutiqueFront', 'roles' => array('guest', 'user', 'admin')),
                array('route' => 'boutique', 'roles' => array('user', 'admin')),
                array('route' => 'categorie', 'roles' => array('admin')),
                array('route' => 'userBoutique', 'roles' => array('user', 'admin')),
                array('route' => 'changeprofile', 'roles' => array('user', 'admin')),
            )
        ),
    ),
);